#ifndef __CAR_MARSHALTST_H__
#define __CAR_MARSHALTST_H__

#ifndef _NO_INCLIST
#include <elastos.h>
#endif // !_NO_INCLIST

#ifndef __UUNM_marshaltst_DEFINED__
#define __UUNM_marshaltst_DEFINED__
#ifdef __cplusplus
static const wchar_t * const c_pmarshaltstUunm = \
    L"marshaltst.dll";
#else // !__cplusplus
#define c_pmarshaltstUunm L"marshaltst.dll"
#endif // __cplusplus
#endif // __UUNM_marshaltst_DEFINED__

#ifndef __ECLSID_CMarshalTst_DEFINED__
#define __ECLSID_CMarshalTst_DEFINED__
static const _ELASTOS ClassID ECLSID_CMarshalTst = {
    {0xA9951643,0x858C,0x8444,{0x5F,0x74,0x80,0xFC,0x23,0x67,0x0D,0xC2}},
    (wchar_t *)c_pmarshaltstUunm };
#endif // __CLSID_CMarshalTst_DEFINED__

#ifndef __EIID_IMarshalTst_DEFINED__
#define __EIID_IMarshalTst_DEFINED__
static const _ELASTOS InterfaceID EIID_IMarshalTst = \
    {0xF755FF50,0x8592,0x8444,{0x5F,0x74,0x80,0xFC,0xC3,0x42,0x22,0xC2}};
#endif // __IID_IMarshalTst_DEFINED__

interface IMarshalTst;


#ifndef __ENUM_TESTENUM_SDK__
#define __ENUM_TESTENUM_SDK__

enum {
    TestEnum_SDK_Data1 = 0x00000001,
    TestEnum_SDK_Data2 = 0x00000002,
    TestEnum_SDK_Data3 = 0x00000003,
};
typedef _ELASTOS Int32 TestEnum_SDK;

#endif //__ENUM_TESTENUM_SDK__


typedef struct TEST_STRUCT_SDK1 * PTEST_STRUCT_SDK1;

typedef struct TEST_STRUCT_SDK2 * PTEST_STRUCT_SDK2;

struct TEST_STRUCT_SDK1 {
    _ELASTOS Byte cData;
    _ELASTOS Int16 sData;
    _ELASTOS Int32 iData;
    _ELASTOS Int32 ulData;
    _ELASTOS Int64 llData;
};

typedef struct TEST_STRUCT_SDK1 TEST_STRUCT_SDK1;

struct SUB_STRUCT_SDK {
    _ELASTOS Byte cData;
    _ELASTOS Int32 lData;
};

typedef struct SUB_STRUCT_SDK SUB_STRUCT_SDK;

struct TEST_STRUCT_SDK2 {
    _ELASTOS Int32 iData;
    struct SUB_STRUCT_SDK SubData;
};

typedef struct TEST_STRUCT_SDK2 TEST_STRUCT_SDK2;

#ifdef __cplusplus
#include <_marshaltst.h>

class __CMarshalTstBase
{
public:
    static _ELASTOS ECode _NewInContext(
            /* [in] */ IContext* pContext,
            /* [out] */ IInterface** ppObject)
    {
        return _CObject_CreateInstance(ECLSID_CMarshalTst,
                        pContext,
                        EIID_IInterface,
                        (IInterface**)ppObject);
    }
};

class __CMarshalTstSuper : public __CMarshalTstBase
{
public:
};

class CMarshalTst : public __CMarshalTstSuper
{
public:

    static _ELASTOS ECode NewInContext(
            /* [in] */ IContext* pContext,
            /* [out] */ IMarshalTst** ppIMarshalTst)
    {
        return _CObject_CreateInstance(ECLSID_CMarshalTst,
                        pContext,
                        EIID_IMarshalTst,
                        (IInterface**)ppIMarshalTst);
    }

    static _ELASTOS ECode NewInContext(
            /* [in] */ IInterface* pContextObject,
            /* [out] */ IMarshalTst** ppIMarshalTst)
    {
        IContext* pContext = IContext::Probe(pContextObject);
        if (!pContext) return E_NO_INTERFACE;
        return _CObject_CreateInstance(ECLSID_CMarshalTst,
                        pContext,
                        EIID_IMarshalTst,
                        (IInterface**)ppIMarshalTst);
    }

    static _ELASTOS ECode New(
            /* [out] */ IMarshalTst** ppIMarshalTst)
    {
        return _CObject_CreateInstance(ECLSID_CMarshalTst,
                        CTX_SAME_DOMAIN,
                        EIID_IMarshalTst,
                        (PInterface*)ppIMarshalTst);
    }
};


#else // !__cplusplus
#include <_marshaltst_c.h>
#endif // __cplusplus

#endif // __CAR_MARSHALTST_H__
